package com.mmandroid_demo;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import cn.com.mma.mobile.tracking.api.Countly;

/**
 * 此工程是为使用SDK的用户提供的demo
 * 
 * @author lincoln
 * 
 */
public class MainActivity extends Activity {
	int count = 0;

	/**
	 * sdkconfig.xml配置文件服务器存放地址
	 */
	public static final String CONFIG_URL = "http://ff.mobi/sdkconfig.xml";
	/**
	 * 点击监测地址
	 */
	public static final String TEST_TRACKING_URL = "http://vxyz.admaster.com.cn/v/a17298,b49148130,c3194,i0,m201";
//	public static final String TEST_TRACKING_URL = "http://vxyz.admaster.com.cn/v/a17298,b92979612,c3194,i0,m201";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		/**
		 * 初始化SDK
		 */
		Countly.sharedInstance().setLogState(true);
		Countly.sharedInstance().init(this, CONFIG_URL);

	}

	/**
	 * 点击广告，发送消息
	 */
	public void sendClickMsg(View view) {
		Countly.sharedInstance().onClick(TEST_TRACKING_URL);
	}
	/**
	 * 曝光广告，发送消息
	 */
	public void sendExposeMsg(View view) {
		Countly.sharedInstance().onExpose(TEST_TRACKING_URL);
	}

}
